#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
IR (Intermediate Representation) 模块

提供代码的中间表示形式，用于代码生成和转换。
"""

# 基础类
from .base import IRNode, ProcessStatus, Parameter

# 表达式类
from .expressions import (
    IRExpr,
    IRRawExpr,
    IRConstant,
    IRName,
    IRAttribute,
    IRSubscript,
    IRCall,
    IRUnaryOp,
    IRBinOp,
    IRBoolOp,
    IRCompare,
    IRSFormat,
    IRConditional,
    IRComprehension,
    IRGeneratorExp,
    IRDict,
    IRList,
    IRTuple,
    IRSet,
)

# 声明类
from .declarations import (
    IRPropertyNode,
    IRFunctionNode,
    IRMethodNode,
    IRClassNode,
    IREnumNode,
    IRImportNode,
    IRAnnotation,
    IRComment,
)

# 语句类
from .statements import (
    IRStmt,
    IRReturn,
    IRAssign,
    IRIf,
    IRForRange,
    IRForEach,
    IRWhile,
    IRAugAssign,
    IRExprStmt,
    IRGlobal,
    IRNonlocal,
    IRStmtBlock,
)

# 模块类
from .module import IRModule

# 上下文类
from .context import IRContext

# 工具类
from .utilities import (
    IRTemplate,
    IRRawText,
    IRNoneNode,
    IRGroupNode,
)

# 调试工具
from .debug import (
    IRDebugPrinter,
    print_ir_node,
    print_ir_tree,
    print_ir_summary,
    debug_ir_node,
)

__all__ = [
    # 基础类
    "IRNode",
    "ProcessStatus",
    "Parameter",
    # 表达式类
    "IRExpr",
    "IRRawExpr",
    "IRConstant",
    "IRName",
    "IRAttribute",
    "IRSubscript",
    "IRCall",
    "IRUnaryOp",
    "IRBinOp",
    "IRBoolOp",
    "IRCompare",
    "IRSFormat",
    "IRConditional",
    "IRComprehension",
    "IRGeneratorExp",
    "IRDict",
    "IRList",
    "IRTuple",
    "IRSet",
    # 声明类
    "IRPropertyNode",
    "IRFunctionNode",
    "IRMethodNode",
    "IRClassNode",
    "IREnumNode",
    "IRImportNode",
    "IRAnnotation",
    "IRComment",
    # 语句类
    "IRStmt",
    "IRReturn",
    "IRAssign",
    "IRIf",
    "IRForRange",
    "IRForEach",
    "IRWhile",
    "IRAugAssign",
    "IRExprStmt",
    "IRStmtBlock",
    # 模块类
    "IRModule",
    # 上下文类
    "IRContext",
    # 工具类
    "IRTemplate",
    "IRRawText",
    "IRNoneNode",
    "IRGroupNode",
    # 调试工具
    "IRDebugPrinter",
    "print_ir_node",
    "print_ir_tree",
    "print_ir_summary",
    "debug_ir_node",
]
